package com.jic.product.mapper;

import com.jic.product.entity.ProductUnitsRelation;
import com.jic.product.manage.response.ProductUnitsRelationResponse;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 商品计量单位关联表
 * @author :
 * @email :
 * @since : 2020-02-08 03:38:46
 * @version : v1.0.0
 */
@Mapper
public interface  ProductUnitsRelationMapper {

    long insert(ProductUnitsRelation productUnitsRelation);

    long delete(Long id);

    long update(ProductUnitsRelation productUnitsRelation);

    ProductUnitsRelation queryByPrimaryKey(Long id);

    List<ProductUnitsRelationResponse> query(long productId);

    List<ProductUnitsRelation> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("productUnitsRelation") ProductUnitsRelation productUnitsRelation);

    long queryPageCount(ProductUnitsRelation productUnitsRelation);

    /**
     * 查询商品辅计量单位是否重复
     *
     * @author: JackHe
     * @date: 2020/4/10 15:42
     */
    Long queryProductUnitsCount(ProductUnitsRelation productUnitsRelation);


}
